Creating a Database Metadata |
|
Before you begin this task:
- You must have the role of Developer to create the Database Metadata.
- You need to create a WS-AppServer Service using WS-AppServer Application Connector that is configured to a relational database, in the same organization where you are creating the Database Metadata. You cannot use the WS-AppServer Service that exists in another organization.
Note: While creating the WS-AppServer Service Group, ensure that the WS-AppServer Runtime Method Set Web service interface is selected on the Provide Service Group Details page of the wizard. This is mandatory. You may also attach other Web service interfaces depending upon your requirement.
A Database Metadata represents the structure of a database. It uses the WS-AppServer Service to connect to the database and get the details. A Database Metadata provides direct access to the database and helps in quick generation of Web service. It also forms the basis for modeling WS-AppServer data objects.
- Select a starting point and click to open the Database Metadata modeler.
- Select the WS-AppServer Servicefrom the drop-down list
- Click Search in database button to retrieve all DBObjects(Tables,Views and Procedures),
- To retrieve DBObjects of a specific type in the pattern, click Search in database button(To get DBObjects with "Order" in their names, the pattern should be "Order")
- Uncheck the Load Related Tables check box to retrieve the selected tables only. By default, the related tables of the selected tables are also retrieved.
- Select the required DBObjects and move them to the Workspace using >> and > buttons.
- Click Save. The Save Document dialog box closes and the database tables (represented by ) appear on the right pane of the window.
- Close the Database Metadata window.
The Database Metadata is created with the provided name and is stored at the selected location.After you complete this task:
- Go to the require database table ( ), click > Actions and select Generate Custom Web Service Operation or Reload Database Metadata.
- You can do any of the following on the toolbar of Database Metadata:
- Click to load tables from database
- Click to create a WS-AppServer Package
- Click to generate Web service operations
- On the left pane of the Database Metadata, you have an option to select the WS-AppServer Service and view its contents.
Note: If you are using MySQL Server 5.5 or earlier versions, ensure to add useInformationSchema=true to the MySQL Connection String. For example:jdbc:mysql://servername:portnumber/database?useInformationSchema=true
and regenerate the database metadata for Tables, Views, and Procedures.
- At any point of time, to view the tables or views available in a Database Metadata, do one of the following:
- In the Workspace Documents (Explorer), expand the Database Metadata.
- Double-click the Database Metadata and on the toolbar of Database Metadata window. The tables and views appear in a pane on the right side of the window.
- At any point of time, to switch between Database Metadata abstracted by different WS-AppServer Services, do the following:
- In the left pane of the Database Metadata window, select the WS-AppServer Service from the drop-down list. All the corresponding contents are loaded and refreshed in the Children - Database Metadata pane.
- Click . The Database Metadata will display the contents from the selected WS-AppServer Service until it is changed again.
- In the Workspace Documents (Explorer), expand the Database Metadata to refresh its contents (Tables, Views, Procedures).